Skip to content

Add version cooldown to filter recently published packages#17

Merged
andrew merged 2 commits into
mainfrom
cooldown-feature
Mar 11, 2026
Merged

Add version cooldown to filter recently published packages#17
andrew merged 2 commits into
mainfrom
cooldown-feature

Conversation

@andrew
Copy link
Copy Markdown
Contributor

@andrew andrew commented Mar 4, 2026

Hides package versions published too recently from metadata responses, giving the community time to spot malicious releases before they're pulled into projects.

  • New internal/cooldown package with duration parsing (3d, 48h, 30m) and config resolution (package > ecosystem > global default)
  • cooldown config section with default, ecosystems, and packages overrides (keyed by PURL)
  • Filtering in npm (via time map), PyPI (via upload_time_iso_8601), pub.dev (via published), and Composer (via time)
  • Updates dist-tags.latest / latest when the current latest is filtered
  • PyPI simple HTML filtering fetches JSON metadata to get timestamps when cooldown is enabled
  • PROXY_COOLDOWN_DEFAULT env var support

andrew added 2 commits March 4, 2026 19:00
Hides package versions published too recently from metadata responses,
giving the community time to spot malicious releases. Configurable
per-ecosystem and per-package with duration overrides. Supported for
npm, PyPI, pub.dev, and Composer.
Explains the motivation (supply chain attacks rely on speed), shows a
concrete config example, and walks through what happens when a new
version is published.
@andrew andrew merged commit 4858286 into main Mar 11, 2026
4 checks passed
@andrew andrew deleted the cooldown-feature branch March 11, 2026 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant